<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>De Bello Gallico</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="../flashcard.css" rel="stylesheet" type="text/css">
</head>


<script type="text/javascript">
var sentences = [
  [ ["Caesari", "renuntiatur", "Helvetiis", "esse", "in", "animo", "per", "agrum", "Sequanorum", "et", "Aeduorum", "iter", "in", "Santonum", "fines", "facere,"],
    ["To-Caesar", "word-is-brought-back", "to-Helvetii", "to-be", "in", "mind", "through", "country", "of-Sequani", "and", "of-Aedui", "journey", "into", "of-Santones", "[the]-territores", "to-make,"] ],
  [ ["qui", "non", "longe", "a", "Tolosatium", "finibus", "absunt,", "quae", "civitas", "est", "in", "provincia."],
    ["who", "not", "far", "from", "of-Tolosates", "[the]-boundaries", "away-are,", "which", "state", "is", "in", "province."] ],
  [ ["Id", "si", "fieret,", "intellegebat", "magno", "cum", "periculo", "provinciae", "futurum,"],
    ["That", "if", "should-be-done,", "he-knew", "great", "with", "danger", "to-province", "about-to-be_(to-be),"] ],
  [ ["ut", "homines", "bellicosos,", "populi", "Romani", "inimicos,", "locis", "patentibus", "maximeque", "frumentariis", "finitimos", "haberet."],
    ["that", "men", "war-like,", "of-people", "Roman", "enemies,", "to-places", "lying-open", "most-also", "rich-in-grain", "[as]_neighbors", "it-should-have."] ],
  [ ["Ob", "eas", "causas", "ei", "munitioni", "quam", "fecerat", "T.", "Labienum", "legatum", "praefecit;"],
    ["For", "those", "reasons", "to-that", "fortification", "which", "he-had-made", "Titus", "Labienus", "lieutenant", "he-placed-in-command-of;"] ],
  [ ["ipse", "in", "Italiam", "magnis", "itineribus", "contendit", "duasque", "ibi", "legiones", "conscribit"],
    ["himself", "into", "Italy", "by-great", "marches", "hastens", "two-and", "there", "legions", "he-enrolls"] ],
  [ ["et", "tres,", "quae", "circum", "Aquileiam", "hiemabant,", "ex", "hibernis", "educit"],
    ["and", "three,", "which", "around", "Aquileia", "were-wintering,", "out-of", "winter-quarters", "out-he-leads"] ],
  [ ["et,", "qua", "proximum", "iter", "in", "ulteriorem", "Galliam", "per", "Alpes", "erat,", "cum", "his", "quinque", "legionibus", "ire", "contendit."],
    ["and,", "by-which_[way]", "nearest", "route", "into", "Farther", "Gaul", "through", "Alps", "was,", "with", "these", "five", "legions", "to-go", "hastens."] ],
  [ ["Ibi", "Ceutrones", "et", "Graioceli", "et", "Caturiges", "locis", "superioribus", "occupatis", "itinere", "exercitum", "prohibere", "conantur."],
    ["There", "Centrones", "and", "Graioceli", "and", "Caturiges", "places", "higher", "having-been-occupied", "on-[the]-march", "army", "to-keep-back", "attempt."] ],
  [ ["Compluribus", "his", "proeliis", "pulsis", "ab", "Ocelo,", "quod", "est", "citerioris", "provinciae", "extremum,"],
    ["In-very-many", "these", "battles", "having-been-defeated", "from", "Ocelum,", "which", "is", "of-hither", "province", "last,"] ],
  [ ["in", "fines", "Vocontiorum", "ulterioris", "provinciae", "die", "septimo", "pervenit;"],
    ["into", "territories", "of-Vocontii", "of-farther", "province", "on-day", "seventh", "through-he-comes;"] ],
  [ ["inde", "in", "Allobrogum", "fines,", "ab", "Allobrogibus", "in", "Segusiavos", "exercitum", "ducit."],
    ["thence", "into", "Allobroges’", "territories,", "from", "Allobroges", "among", "Segusiani", "army", "he-leads."] ],
  [ ["Hi", "sunt", "extra", "provinciam", "trans", "Rhodanum", "primi."],
    ["These", "are", "beyond", "province", "across", "Rhone", "[the]-first."] ]
];

var i = 0;
var j = 0;

var shown = 0;

function updateVoc() {
	
	var sentence = "";
	
	for(n = 0; n < sentences[i][0].length; n++) {
		if (n == j) {
			sentence += ' <span class="curword">' + sentences[i][0][n] + "</span>";
		} else {
			sentence += " " + sentences[i][0][n];
		}
	}
	
	document.getElementById('v3').innerHTML = sentence;
	
	if (shown == 0) {
		document.getElementById('v1').innerHTML = "";
	} else {
		document.getElementById('v1').innerHTML = sentences[i][1][j];
	}
}

function next() {
	shown++;
	if (shown > 1) {
		shown = 0;
		j++;
		if (j >= sentences[i][0].length) {
			j = 0;
			i++;
			if (i >= sentences.length) {
				i = 0;
				alert('All done!');
			}
		}
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = 1;
		j--;
		
		if (j < 0) {
			i--;
			if (i < 0) {
				i = sentences.length - 1;
				alert('All done!');
			}
			j = sentences[i][0].length - 1;
		}
	}
	
	updateVoc();
}

</script>

<body onload="updateVoc()">
<h1 style="text-align:center; color: #60B0C0;">Liber I - Caput X</h1>

<div class="center">
<div id="v3" class="v3"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v1" class="v1"></div>


<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
</body>
</html>
